import { defineService } from 'easy'
import schema from './__schema'

export default defineService({
  schema,
  handler(ctx) {
    const test = {
      a: 1,
      b: 2,
      user_id: 111,
      test_name: 'zz',
      bsd: { a: 1, user_name: 2 },
    }
    ctx.send({ pick: ctx.pick(test, 'a'), omit: ctx.omit(test, 'a'), user: ctx.state.userInfo })
  },
})
